package com.lanyun.serviceimpl;

import com.lanyun.dao.WarehouseDao;
import com.lanyun.pojo.Warehouse;
import com.lanyun.service.WarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李向南
 * 仓库
 */
@Service
public class WarehouseServiceImpl implements WarehouseService {

    @Autowired
    public WarehouseDao waredao;

    //查询所有的仓库信息
    @Override
    public List<Warehouse> listAllw() {

        return waredao.listAllw();
    }
    //查询所有管理员姓名
    @Override
    public List listAllAdminName() {
        return waredao.listAllAdminName();
    }

    //增加仓库
    @Override
    public int add_warehouse(Warehouse warehouse) {
        return waredao.add_warehouse(warehouse);
    }

    @Override
    //回显数据(修改仓库)
    public Warehouse updeat_huixian_warehous(Integer id){

        return waredao.updeat_huixian_warehous(id);
    }

    //修改仓库
    @Override
    public int update_warehouse(Warehouse warehouse) {
        return waredao.update_warehouse(warehouse);
    }

    //单项删除
    @Override
    public Integer delete_warehouse(Integer id) {
        return waredao.delete_warehouse(id);
    }

    //批量删除
    @Override
    public Integer deleteWarehouse(List<Integer> list) {
        return waredao.deleteWarehouse(list);
    }

    //采购入库选择仓库
    @Override
    public Warehouse selectWarehouse(String id) {
        return waredao.selectWarehouse(id);
    }

}
